package com.fishing.mapper;

import java.util.List;
import java.util.Map;

import com.fishing.entity.Admin;
import com.fishing.entity.Auth;
import com.fishing.entity.AuthMap;
import com.fishing.entity.Role;
import com.fishing.entity.ZTreeModel;

public interface RoleMapper {
	int deleteByPrimaryKey(Integer id)throws Exception;

    int insert(Role record)throws Exception;

    Role selectByPrimaryKey(Integer id)throws Exception;

    List<Role> selectAll(Map<String,Object> map)throws Exception;

    int updateByPrimaryKey(Role record)throws Exception;
    
    List<Admin> selectRoleAdmins(Integer roleId)throws Exception;
    
    int deleteAdminsByRoleId(Integer roleId)throws Exception;
    
    int insertRoleAdmins(Map<String,Object> map)throws Exception;
    
    List<String> queryAuthPids(String pid)throws Exception;
    
    Auth getAuthById(String id)throws Exception;
    
    int deleteAuthsByRoleId(Integer roleId)throws Exception;
    
    int insertRoleAuths(Map<String,Object> map)throws Exception;
    
    List<ZTreeModel> queryAuthsByPid(String pid) throws Exception;
    
    List<String> queryAuthsByRoleId(Integer roleId) throws Exception;
    
    List<AuthMap> queryAuthMaps(Map<String,Object> map)throws Exception;
    
    List<String> queryAuthsByAdminId(Integer adminId) throws Exception;
}
